package zb;

import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.FileInputStream;
import java.io.FileOutputStream;


/**
 * @author wzby
 * @Date: 2022/8/2 19:45
 */
public class Buff {
    public static void main(String[] args) {
            try(
                    FileInputStream fis = new FileInputStream("E:\\uexdir\\user\\lmg2.png");
                    FileOutputStream fos = new FileOutputStream("lmg2.png");
                    BufferedInputStream bis = new BufferedInputStream(fis);
                    BufferedOutputStream bos = new BufferedOutputStream(fos);
                    ) {
                    // long ll = System.currentTimeMillis();
                   // int b = 0;
                   // while ( (b =fis.read()) != -1){
                    //    fos.write(b);
                   // }
                    //long ee = System.currentTimeMillis();
                    //System.out.println(ee-ll);
                long ll = System.currentTimeMillis();
                int b = 0;
                while ( (b =bis.read()) != -1){
                    fos.write(b);
                }
                long ee = System.currentTimeMillis();
                System.out.println(ee-ll);
            }catch (Exception e){

            }
    }
}
